<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <style>
            #signupForm {
                width: 670px;
            }
            #signupForm label.error {
                margin-left: 10px;
                width: auto;
                display: inline;
            }
        </style>
        <script src="js//jquery.min.js"></script>
        <script src="js//validate.min.js"></script>
        <script src="js//messages_zh.min.js"></script>
        <script>
$(document).ready(function(){
    $("#signupForm").validate({
        rules: {
            username:{
                required: true,
                minlength: 2       
            },
            password:{
                required: true,
                minlength: 5
            },
            confirm_password:{
                required: true,
                minlength: 5,
                equalTo: "#password"
            }          
},
        messages: {
              username:{
              required:"请输入账号",
              minlength:"至少2个字符"
            },
              password:{
              required:"请输入密码",
              minlength:"至少5个字符"
             }，
        confirm_password:{
              required:"请输入密码",
              minlength:"至少5个字符",
              equalTo: "请与前面密码一致"
            }
        }
});
    
})
 
    </head>

